//
//  NSString+GetFirstLetterCapital.m
//  OC08_Category_Extension_Protocol
//
//  Created by dllo on 16/5/31.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "NSString+GetFirstLetterCapital.h"

@implementation NSString (GetFirstLetterCapital)

-(NSString *)getCapital{
    if ([self length] > 0) {
        NSString *a = [[self substringWithRange:NSMakeRange(0, 1)] capitalizedString];
        return a;
    } else {
        NSLog(@"字符串为空.");
        return nil;
    }
}

-(NSInteger)midIndex{
    return self.length / 2;
}

@end
